<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    function Person( name, age, gender ) {
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.sayHello = function () {
            console.log( '你好, 我是 ' + this.name );
        };
    }

    var p = new Person( 'jim', 19, '男' );

    p.sayHello();
</script>
</html>